{% macro form(q='') -%}
  <div id="basic-search" class="search-empty">
  {{ _('Enter your terms in the form below and click <strong>Search</strong>')|safe }}
    <form role="search" method="get" action="{{ url('search') }}">
      <input type="text" class="search-query search-empty-query" value="{{ q }}" name="q">
      <input type="submit" class="search-empty-submit btn-large btn btn-submit" value="{{ pgettext('button', 'Search') }}">
    </form>
  </div>
{%- endmacro %}

{% macro mobile_form(q='', params=None) -%}
  <form id="search" action="{{ url('search') }}">
    {% if params %}
      {% for k, v in params.items() %}
        <input type="hidden" name="{{ k }}" value="{{ v }}" />
      {% endfor %}
    {% endif %}
    <input name="q" placeholder="{{ _('Search') }}" required="required" type="search" autocomplete="off" value="{{ q }}">
    <button type="submit" value="">
      <svg width="22" height="23"><polygon fill="#ffffff" points="22,12 11,23 8,20 14,14 0,14 0,10 14,10 8,4 11,1"/></svg>
    </button>
  </form>
{%- endmacro %}

{% macro mobile_nav_form(q='', params=None) %}
  <form id="search" action="{{ url('search') }}">
    {% if params %}
      {% for k, v in params.items() %}
        <input type="hidden" name="{{ k }}" value="{{ v }}" />
      {% endfor %}
    {% endif %}
    <input name="q" placeholder="{{ _('Search Mozilla Support') }}" required="required" type="search" autocomplete="off" value="{{ q }}">
    <button class="icon-sprite" type="submit">{{ _('Search') }}</button>
  </form>
{% endmacro %}

{% macro mobile_results_form(q='', params=None) %}
  <form id="search" action="{{ url('search') }}">
    {% if params %}
      {% for k, v in params.items() %}
        <input type="hidden" name="{{ k }}" value="{{ v }}" />
      {% endfor %}
    {% endif %}
    <input name="q" placeholder="{{ _('Search Mozilla Support') }}" required="required" type="search" autocomplete="off" value="{{ q }}">
    <button type="submit">{{ _('Search') }}</button>
  </form>
{% endmacro %}
